home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Sprite 1984 - 1993
/
Sprite 1984 - 1993.iso
/
lib
/
tex
/
showlabels.sty
< prev
next >
Wrap
Text File
|
1988-04-18
|
1KB
|
29 lines
% showlabels.sty
% gil@svax.cs.cornell.edu (Gil Neiger)
%
% Change \label, \ref, and \pageref to show labels in line
%
\def\ref#1{\@ifundefined{r@#1}{\mbox{\tt#1?}\@warning
{Reference `#1' on page \thepage \space
undefined}}{\edef\@tempa{\@nameuse{r@#1}}\expandafter
\@car\@tempa \@nil\null}}
\def\pageref#1{\@ifundefined{r@#1}{\mbox{\tt#1?}\@warning
{Reference `#1' on page \thepage \space
undefined}}{\edef\@tempa{\@nameuse{r@#1}}\expandafter
\@cdr\@tempa\@nil\null}}
\def\label#1{\@bsphack\if@filesw {\let\thepage\relax
\xdef\@gtempa{\write\@auxout{\string
\newlabel{#1}{{\@currentlabel}{\thepage}}}}}\@gtempa
\if@nobreak \ifvmode\nobreak\fi\fi\fi\@esphack
\mbox{\tt[#1]}}
\def\@citex[#1]#2{\if@filesw\immediate\write\@auxout{\string\citation{#2}}\fi
\def\@citea{}\@cite{\@for\@citeb:=#2\do
{\@citea\def\@citea{,}\@ifundefined
{b@\@citeb}{\mbox{\tt\@citeb?}\@warning
{Citation `\@citeb' on page \thepage \space undefined}}%
\hbox{\csname b@\@citeb\endcsname}}}{#1}}